package flextv.main.command {

import com.adobe.cairngorm.commands.ICommand;
import com.adobe.cairngorm.control.CairngormEvent;

import flextv.core.logic.Logger;
import flextv.main.event.ToggleStatusbarVisibilityEvent;
import flextv.main.logic.MainModel;

import mx.logging.ILogger;

public class ToggleStatusbarVisibilityCommand implements ICommand {
	
	private static const LOG: ILogger = Logger.getLog(ToggleStatusbarVisibilityCommand);
	
	public function ToggleStatusbarVisibilityCommand() {
	}

	public function execute(_event: CairngormEvent): void {
		const event: ToggleStatusbarVisibilityEvent = _event as ToggleStatusbarVisibilityEvent;
		LOG.info("Executing [event=" + event + "].");
		
		MainModel.instance.isStatusbarVisible = !MainModel.instance.isStatusbarVisible;
	}
	
}
}
